package edu.sctu.practice.class02.yangshengyu.assign02.test01;

import java.util.Scanner;

/**
 * Created by Cullen on 2015/10/8.
 */
public class Open {
    public static void main(String[] args) {
        int num = 0;

        Circle a = new Circle();

        for (int i = 0; i < 100000; i++) {

            System.out.println("请输入圆的半径(至多保留两位小数)，输入0则取消计算：");
            Scanner input = new Scanner(System.in);
            double m = input.nextDouble();

            if (m == 0) {
                System.out.println("计算已取消！");
                break;

            } else {
                a.radiusValue = m;
                PrintCircle open = new PrintCircle();
                open.printCircle(a);
            }
            num = i + 1;
        }

        a.numOfObjects = num;
        System.out.println("计算的圆的个数有：" + a.numOfObjects);
    }
}
